This invention is related to the field of semiconductor lasers and in particular to a method for fabricating gratings in semiconductor materials for DBR or DFB lasers.